package com.shop.shoporder.service;



import com.shop.shoporder.entity.order.Cart;
import com.shop.shoporder.entity.order.CartList;
import com.shop.shoporder.entity.order.Order;
import org.apache.ibatis.annotations.Param;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

public interface CartService {
    int deleteByPrimaryKey(Integer cartId);

    int insert(Cart record);

    int insertSelective(Cart record);

    Cart selectByPrimaryKey(Integer cartId);

    int updateByPrimaryKeySelective(Cart record);

    int updateByPrimaryKey(Cart record);
    int upCartLogType(@Param("cartIdsList") List<String> cartIdsList,@Param("logisticsType")int logisticsType);
    List<CartList> selectOrderList(Order order);
    List<Cart> getOrderCommentGoodsList(Map<String, String> map, HttpServletRequest request) throws  Exception;
//    Cart selectCartByProductIDAndGuigeID(Cart record);
List<CartList> selectCartListByOrderNo(@Param("usernoId")int usernoId,@Param("orderNo")String orderNo);
    Integer addCart(Map<String, String> map, HttpServletRequest request) throws  Exception;
    Boolean editCart(Map<String, String> map, HttpServletRequest request) throws  Exception;
    Boolean deleteCart(Map<String, String> map, HttpServletRequest request) throws  Exception;
    Cart selectCartIsExist(Cart record);
    List<CartList> selectCartList(Cart cart);

    List<CartList> selectCartList(Map<String, String> map, HttpServletRequest request) throws  Exception;
    List<CartList> selectCartListSureOrder(@Param("userNoId") int usernoId, @Param("cartIdsList") List<String> cartIdsList);
    int upCartStatus(@Param("orderNo") String orderNo,@Param("cartIdsList") List<String> cartIdsList);

    List<Cart> selectListByOrderNo(String orderNo);
    int updateLogByOrderNo(@Param("logisticalNo") String logisticalNo, @Param("orderList") List<String> orderList);
    int updateStateByOrderNo(@Param("orderList") List<String> orderList);
}
